[mirrors]
https://gitlab.com/tome2/tome2/repository/archive.tar.bz2?ref=e3bd0ad5

[vars]
filesize=3048200
sha512=e9fb46f8f5bebb3bde2f151e5c412c88598bfcccbd1d8012a28cd280382c8609772409a48bbafdc25d8412b986f005c120553c7baff9f45af0e5e8e1671f4eeb
tardir=tome2-e3bd0ad5-e3bd0ad51f89ade115ce5ff1f1c3f8687353e36d
tarball=tome2-e3bd0ad5.tar.bz2

[deps]
sdl
sdl-ttf
sdl-image
jansson
curses

[deps.host]
cmake

[build]
mkdir -p build && cd build
[ -n "$CROSS_COMPILE" ] && xconfflags="
-DCMAKE_FIND_ROOT_PATH=$butch_root_dir$butch_prefix \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-DFREETYPE_INCLUDE_DIR_freetype2=$butch_root_dir$butch_prefix/include/freetype2 \
"

CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags  -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
cmake $xconfflags \
  -DCMAKE_INSTALL_PREFIX="$butch_prefix" \
  -DCMAKE_VERBOSE_MAKEFILE=ON \
  -DSYSTEM_INSTALL:BOOL=true ..
make -j$MAKE_THREADS VERBOSE=1
make DESTDIR="$butch_install_dir" install
